home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / arvis1 / inputwin.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-08-10  |  7.1 KB  |  213 lines

  1. VERSION 5.00
  2. Begin VB.Form InputWindow 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Congratulations You Have The New High Score"
  5.    ClientHeight    =   3195
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   4680
  9.    ClipControls    =   0   'False
  10.    ControlBox      =   0   'False
  11.    Icon            =   "InputWindow.frx":0000
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    Moveable        =   0   'False
  16.    ScaleHeight     =   3195
  17.    ScaleWidth      =   4680
  18.    StartUpPosition =   2  'CenterScreen
  19.    Begin VB.TextBox NewName 
  20.       Height          =   330
  21.       Left            =   135
  22.       TabIndex        =   1
  23.       Top             =   2160
  24.       Width           =   4380
  25.    End
  26.    Begin VB.Label Label4 
  27.       Alignment       =   2  'Center
  28.       AutoSize        =   -1  'True
  29.       BackStyle       =   0  'Transparent
  30.       Caption         =   "Cancel"
  31.       BeginProperty Font 
  32.          Name            =   "Times New Roman"
  33.          Size            =   20.25
  34.          Charset         =   0
  35.          Weight          =   400
  36.          Underline       =   0   'False
  37.          Italic          =   0   'False
  38.          Strikethrough   =   0   'False
  39.       EndProperty
  40.       ForeColor       =   &H00008000&
  41.       Height          =   465
  42.       Left            =   2790
  43.       TabIndex        =   4
  44.       Top             =   2610
  45.       Width           =   1155
  46.    End
  47.    Begin VB.Label Label3 
  48.       Alignment       =   2  'Center
  49.       AutoSize        =   -1  'True
  50.       BackStyle       =   0  'Transparent
  51.       Caption         =   "OK"
  52.       BeginProperty Font 
  53.          Name            =   "Times New Roman"
  54.          Size            =   20.25
  55.          Charset         =   0
  56.          Weight          =   400
  57.          Underline       =   0   'False
  58.          Italic          =   0   'False
  59.          Strikethrough   =   0   'False
  60.       EndProperty
  61.       ForeColor       =   &H00008000&
  62.       Height          =   465
  63.       Left            =   705
  64.       TabIndex        =   3
  65.       Top             =   2610
  66.       Width           =   585
  67.    End
  68.    Begin VB.Label Label2 
  69.       BackStyle       =   0  'Transparent
  70.       Caption         =   "Enter Your Name:"
  71.       BeginProperty Font 
  72.          Name            =   "Times New Roman"
  73.          Size            =   9.75
  74.          Charset         =   0
  75.          Weight          =   700
  76.          Underline       =   0   'False
  77.          Italic          =   0   'False
  78.          Strikethrough   =   0   'False
  79.       EndProperty
  80.       ForeColor       =   &H00FFFF00&
  81.       Height          =   240
  82.       Left            =   135
  83.       TabIndex        =   2
  84.       Top             =   1845
  85.       Width           =   1500
  86.    End
  87.    Begin VB.Label Label1 
  88.       Alignment       =   2  'Center
  89.       BackStyle       =   0  'Transparent
  90.       Caption         =   "You Have Beaten The High Score For Quad-Ball !"
  91.       BeginProperty Font 
  92.          Name            =   "Times New Roman"
  93.          Size            =   24
  94.          Charset         =   0
  95.          Weight          =   700
  96.          Underline       =   0   'False
  97.          Italic          =   0   'False
  98.          Strikethrough   =   0   'False
  99.       EndProperty
  100.       ForeColor       =   &H0000FFFF&
  101.       Height          =   1635
  102.       Left            =   45
  103.       TabIndex        =   0
  104.       Top             =   -45
  105.       Width           =   4515
  106.    End
  107. Attribute VB_Name = "InputWindow"
  108. Attribute VB_GlobalNameSpace = False
  109. Attribute VB_Creatable = False
  110. Attribute VB_PredeclaredId = True
  111. Attribute VB_Exposed = False
  112. 'This Form Is Used To Get The Name Of The High Scorer '
  113. '_____________________________________________________'
  114. Private Sub Form_Load()
  115.  Call Set_Mouse_X_Y(Me.Left / Screen.TwipsPerPixelX + 100, Me.Top / Screen.TwipsPerPixelY + 100)
  116.  ExitInputWindow = False
  117.  Me.Picture = ParentForm.StoryScreen.Picture ' load back image
  118.  Me.Show
  119.  Me.Refresh
  120.  LimitMovement ' start loop to control mouse
  121. End Sub
  122. 'Limits Mouse Movemnt
  123. Private Sub LimitMovement()
  124.   If ExitMouse = True Then GoTo nd:
  125.   If ExitInputWindow = True Then GoTo nd:
  126.   Me.ZOrder 0 ' place in front
  127.   DoEvents
  128.   KeepMouseOnForm ' move mouse onto form
  129.  Loop Until ExitMouse = True
  130. Unload Me
  131. End Sub
  132. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  133.  ExitMouse = True
  134.  ExitInputWindow = True
  135. End Sub
  136. 'Svae The new Top Score And Scorer Name
  137. Private Sub Label3_Click()
  138.  Call SaveScore(NewName.Text, ParentForm.Score.caption)
  139.  Unload Me
  140. End Sub
  141. 'highlights Label 3 On Mouse Move
  142. Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  143.  If Label3.Tag = "yes" Then Exit Sub
  144.  Label3.Tag = "yes"
  145.  If Label4.Tag = " yes" Then
  146.   Label4.ForeColor = RGB(0, 90, 0)
  147.   Label4.Top = Label4.Top + 50
  148.   Label4.FontSize = Label4.FontSize - 5
  149.   Label4.Tag = "no"
  150.  End If
  151.  WAVPlay "click.qbs"
  152.  Label3.Top = Label3.Top - 50
  153.  Label3.ForeColor = RGB(0, 255, 0)
  154.  Label3.FontSize = Label3.FontSize + 5
  155.  End Sub
  156. 'Exits The Form
  157. Private Sub Label4_Click()
  158.  Dim Result As VbMsgBoxResult
  159.  Result = MsgBox("Are You Sure?, If You Click OK Your New Top Score Will not Be Saved!", vbOKCancel, "Confirmation")
  160.  If Result = vbCancel Then
  161.   Exit Sub
  162.  Else
  163.   ExitMouse = True
  164.   Unload Me
  165.  End If
  166. End Sub
  167. 'highlights Label 4 On Mouse Move
  168. Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  169.  If Label4.Tag = "yes" Then Exit Sub
  170.  Label4.Tag = "yes"
  171.  If Label3.Tag = " yes" Then
  172.   Label3.ForeColor = RGB(0, 90, 0)
  173.   Label3.Top = Label3.Top + 50
  174.   Label3.FontSize = Label3.FontSize - 5
  175.   Label3.Tag = "no"
  176.  End If
  177.  WAVPlay "click.qbs"
  178.  Label4.ForeColor = RGB(0, 255, 0)
  179.  Label4.Top = Label4.Top - 50
  180.  Label4.FontSize = Label4.FontSize + 5
  181.  End Sub
  182. 'unhighlights Labels 3 + 4  On Mouse Move
  183. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  184.  If Label4.Tag = "yes" Then
  185.   Label4.ForeColor = RGB(0, 90, 0)
  186.   Label4.Top = Label4.Top + 50
  187.   Label4.FontSize = Label4.FontSize - 5
  188.   Label4.Tag = "no"
  189.  End If
  190.  If Label3.Tag = "yes" Then
  191.   Label3.ForeColor = RGB(0, 90, 0)
  192.   Label3.Top = Label3.Top + 50
  193.   Label3.FontSize = Label3.FontSize - 5
  194.   Label3.Tag = "no"
  195.  End If
  196.  Label4.ForeColor = RGB(0, 90, 0)
  197.  Label3.ForeColor = RGB(0, 90, 0)
  198. End Sub
  199. ' Call This To Make Sure The Mouse doesn't leave The Form
  200. Private Sub KeepMouseOnForm()
  201. If ExitMouse = True Or ExitInputWindow = True Then GoTo nd:
  202. If Get_Mouse_X >= Int((Me.Left + Me.Width) _
  203.  / Screen.TwipsPerPixelX) - 5 Then _
  204.  Set_Mouse_X ((Me.Left + Me.Width) / Screen.TwipsPerPixelX) - 5
  205. If Get_Mouse_X <= Int((Me.Left) _
  206.  / Screen.TwipsPerPixelX) Then _
  207.  Set_Mouse_X ((Me.Left) / Screen.TwipsPerPixelX) + 5
  208. If Get_Mouse_Y <= Int(Me.Top / Screen.TwipsPerPixelY) + 5 Then _
  209.  Set_Mouse_Y (Me.Top / Screen.TwipsPerPixelY) + 5
  210. If Get_Mouse_Y >= Int((Me.Top + Me.Height) / Screen.TwipsPerPixelY) - 5 Then _
  211.  Set_Mouse_Y ((Me.Top + Me.Height) / Screen.TwipsPerPixelY) - 5
  212. End Sub
  213.